# -*- python -*-
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


Import('env')


# NOTE: Probably because of GetPluginDir()
if env.Bit('linux') and env.Bit('build_x86'):
  env.Append(LIBS=['dl'])


# NOTE: we need Cocoa because of the GetPluginDir() implementation
#       on mac (nonnacl_util_c)
env.ComponentProgram('sel_universal',
                     ['parsing.cc',
                      'pnacl_emu_stream.cc',
                      'replay_handler.cc',
                      'rpc_universal_system.cc',
                      'rpc_universal.cc',
                      'sel_universal.cc',
                     ],
                    EXTRA_LIBS=['nonnacl_util',
                                'nonnacl_srpc',
                                'simple_service',
                                'thread_interface',
                                'nrd_xfer',
                                'nacl_base',
                                'platform',
                                'gio',
                                'imc',
                                'env_cleanser',
                                'nacl_error_code',
                                ],
                    FRAMEWORKS=['Cocoa'],
                    )
